home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / DONALDXC / HYPERUTI.H < prev    next >
Text File  |  1990-05-01  |  2KB  |  63 lines

  1. /********************************/
  2. /* HyperUtils.H                    */
  3. /*                                 */
  4. /* Header file for HyperUtils.c    */
  5. /* routines...                    */
  6. /*                                 */
  7. /********************************/
  8.  
  9. #define        UPFRONT        -1L
  10. #define        SPACE        32
  11. #define        SYS_RES        0            /*** resource id of the system     ***/
  12.  
  13. #ifndef NIL                            /*** standard definition of NIL    ***/
  14.     #define NIL ( (void *)0 )
  15. #endif
  16.  
  17. #ifndef empty                        /*** an alias for nil            ***/
  18.     #define empty ( (void *)0 )
  19. #endif
  20.  
  21.  
  22. #define isUpper( c ) ( (c >= 'A' && c <= 'Z') ? 1 : 0 )
  23. #define isLower( c ) ( (c >= 'a' && c <= 'z') ? 1 : 0 )
  24. #define    toUpper( c ) ( (isLower( c )) ? c - 'a' + 'A': c )
  25. #define toLower( c ) ( (isUpper( c )) ? c + 'a' - 'A': c )
  26. #define isAlpha( c ) ( ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) ? 1 : 0 )
  27.  
  28. #ifdef UsingHypercard
  29. void    paramtoPString( XCmdBlockPtr paramPtr, short i, char *n);
  30. long     paramtoNum();
  31. Handle     NumToParam( XCmdBlockPtr paramPtr, long num );
  32. #endif
  33.  
  34. void    *sys_alloc( long len );
  35. short    validHandle( void *h );
  36. void    TrashHandle( Handle h );
  37. Handle    NewSysHandle( long len );
  38. Handle    GetSystemResource( ResType typ, short id );
  39. void    RemoveSystemResource( Handle h );
  40. void    AddSystemResource( Handle h, ResType typ, short id, char *name );
  41.  
  42.  
  43. void    appendChar( char *theStr, char    theChar );
  44. void     CopyStrToHandle( char *theStr, Handle hand );
  45. void    CopyDataToHandle( char *theData, long theLen, Handle theHand, char delim );
  46. char    *CopyAscii( char *outStr, char    theChar );
  47. void    AppendCharToHandle( Handle theHand, char theChar );
  48.  
  49. short    pStrToField( char *str, char delim, Handle list );
  50. void    DataToField( char *str,    short len, char delim, Handle list );
  51.  
  52. void     ClimbTree( long child, CInfoPBPtr cpb, char *fullName );
  53. void    CenterWindow( WindowPtr wptr );
  54. void     Concat( char * str1, char * str2 );
  55. void    CopyPStr( char * pStr1, char * pStr2 );
  56. short    GetFileNameToOpen(SFTypeList typs,short typcnt, char *theName, short *theWDID);
  57. OSErr    CopyFile( char *inFile, short inWD, char *outFile, short outWD );
  58.  
  59. void     pStrCopy(  char *inStr, char *outStr );
  60.  
  61. Handle    ErrorReturn( OSErr theErr );
  62.  
  63.